package _997MVC;

import _997MVC.Controller.StudentController;
import _997MVC.model.Student;
import _997MVC.view.StudentView;

/**
 * @Test:
 * @author: ZBoHang
 * @time: 2021/9/18 9:13
 */
class Test {
    public static void main(String[] args) {
        Student model = retrieveStudentFormDatabase();

        StudentView view = new StudentView();
        StudentController controller = new StudentController(model, view);

        controller.updateView();

        controller.setName("大傻");

        controller.updateView();
    }

    private static Student retrieveStudentFormDatabase() {
        Student student = new Student();
        student.setName("二狗");
        student.setRollNo("10");
        return student;
    }
}
